package com.cimpm.project.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.hby.common.annotation.entity.Primary;
import com.hby.common.annotation.entity.Secondary;
import com.hby.common.annotation.entity.VerifyMultiRepetitionField;

import java.util.Date;

@TableName("project_projectuser_mapper")
public class ProjectuserMapper {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Primary
    @VerifyMultiRepetitionField
    private Integer projectId;

    @Secondary
    @VerifyMultiRepetitionField
    private Integer userId;

    @TableLogic
    @TableField(value = "`is_deleted`")
    private Date isDeleted;

    @Version
    @TableField(value = "`version`")
    private Integer version;

    public Integer getId() { return id; }

    public void setId(Integer id) { this.id = id; }

    public Integer getProjectId() { return projectId; }

    public void setProjectId(Integer projectId) { this.projectId = projectId; }

    public Integer getUserId() { return userId; }

    public void setUserId(Integer userId) { this.userId = userId; }

    public Date getIsDeleted() { return isDeleted; }

    public void setIsDeleted(Date isDeleted) { this.isDeleted = isDeleted; }

    public Integer getVersion() { return version; }

    public void setVersion(Integer version) { this.version = version; }

    @Override
    public String toString() {
    return "projectuserMapper{" +
            "id=" + id +
            ", projectId=" + projectId +
            ", userId=" + userId +
            ", isDeleted=" + isDeleted +
            ", version=" + version +
            '}';
    }

}
